<?php
namespace app\admin\controller;
use \think\Controller;
use \think\Db;
class Collect extends Controller
{
public function index(){
			   	//获取视频类型
			   	
			   	$courses=Db::name("courses")->select();
			   	$this->assign("courses",$courses);
			   	// $student=Db::name("students")->select();
		     //     $this->assign("studentlist",$student);
			   	//调用模型层，实现获取用户列表数据的功能
			   	//$videos=Db::name("videos")->select();
			   	//多表连接
			   	$collects=Db::query('select * from collects c,courses course where c.course_id=course.course_id order by c.collect_id desc');
			   	$this->assign("collectlist",$collects);
			   	return $this->fetch();
			}

}